﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RazorTemplateEngine
{
    public abstract class RazorPage
    {
        public abstract StringBuilder ParseResult
        {
            get;
        }

        public abstract Dictionary<string, object> TemplateData
        {
            get;
            set;
        }

        /// <summary>
        /// override  by the dymanic generated class, the method name is defined in 
        /// GeneratedClassContext.DefaultExecuteMethodName in System.Web.Razor
        /// </summary>
        public virtual void Execute() { }
        /// <summary>
        /// implement method in the dymanic generated class , the method name is defined in 
        /// GeneratedClassContext.DefaultWriteLiteralMethodName in System.Web.Razor
        /// </summary>
        /// <param name="literal"></param>
        public abstract void WriteLiteral(string literal);

        /// <summary>
        /// implement method in the dymanic generated class , the method name is defined in 
        /// GeneratedClassContext.DefaultWriteMethodName in System.Web.Razor
        /// </summary>
        /// <param name="obj"></param>
        public abstract void Write(object obj);


        public abstract string Layout
        {
            get;
            set;
        }

        public abstract string ChildBody 
        { 
            get; 
            set; 
        }

        public abstract string RenderBody();
    }
}
